package com.coder.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.coder.entity.MajorSat;
import com.coder.service.MajorSatService;
import com.coder.utils.result.Res;
import com.coder.utils.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @version 1.0
 * @author： 余腾
 * @date： 2021-08-30 19:32
 */
@Slf4j
@RestController
@RequestMapping("/majorSat")
public class MajorSatController {
    @Resource
    MajorSatService majorSatService;

    @GetMapping("/majorSatInfo")
    public Result majorSatInfo(){
        return Res.ok(majorSatService.majorSatInfo());
    }

    @GetMapping("/pages")
    private Result pages(Page<MajorSat> page, MajorSat majorSat){
        return Res.ok(majorSatService.pages(page, majorSat));
    }
}
